<?xml version='1.0' encoding='UTF-8' ?> 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:p="http://primefaces.org/ui"
      xmlns:icecore="http://www.icefaces.org/icefaces/core"
      xmlns:ace="http://www.icefaces.org/icefaces/components"
      xmlns:f="http://java.sun.com/jsf/core">
    
  <f:view contentType="text/html">
    <h:head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <link href="/PRP/faces/resources/css/default.css" rel="stylesheet" type="text/css" />
        <link href="/PRP/faces/resources/css/cssLayout.css" rel="stylesheet" type="text/css" />
        <title>PRP</title>
        <style type="text/css">
            .colStyle{ width: 100%;}
        </style>
    </h:head>

      <h:body>

        <div id="top">
            <ui:insert name="top">
                <h:form>
                    <h:panelGrid columns="2" columnClasses="colStyle,colStyle">
                        <h:panelGroup>
                            PRP <span style="font-size: medium">Personal Resource Planning</span>
                        </h:panelGroup>
                        <h:panelGroup rendered="#{login.logeado}">
                                <div style="text-align: right; font-size: 10px; vertical-align: bottom">
                                    <h:commandLink value="Logout" action="#{login.logout()}" />
                                </div>
                        </h:panelGroup>
                    </h:panelGrid>
                </h:form>
            </ui:insert>
        </div>
        <div>
            <div id="left">
                <ui:insert name="left">
                    <h:form>
                        <f:metadata>  
                            <f:event type="preRenderView" listener="#{login.validaLogin}"></f:event>  
                        </f:metadata> 
                        <p:panelMenu>
                            <p:submenu label="Usuario">
                                <p:menuitem value="Editar" outcome="/faces/usuario/editarUsuario.xhtml" />
                                <p:menuitem value="Borrar" />
                            </p:submenu>
                            <p:submenu label="Consumidor">
                                <p:menuitem value="Crear" outcome="/faces/consumidor/crearConsumidor.xhtml" />
                                <p:menuitem value="Eliminar" outcome="/faces/consumidor/eliminarConsumidor.xhtml" />
                                <p:menuitem value="Editar" />
                                <p:menuitem value="Ligar" outcome="/faces/consumidor/ligarConsumidor.xhtml" />
                                <p:menuitem value="Crear Ingreso" outcome="/faces/consumidor/crearIngreso.xhtml" />
                                <p:menuitem value="Eliminar Ingreso" outcome="/faces/consumidor/eliminarIngreso.xhtml" />
                                <p:menuitem value="Editar Ingreso" outcome="/faces/consumidor/editarIngreso.xhtml" />
                                <p:menuitem value="Permisos" outcome="/faces/consumidor/permisos.xhtml" />
                                <p:submenu label="Operar Ingreso">
                                    <p:menuitem value="Aportar Monto" 
                                                outcome="/faces/consumidor/operarIngreso/aportarMonto.xhtml" />
                                    <p:menuitem value="Traspasar Ingreso" 
                                                outcome="/faces/consumidor/operarIngreso/traspasarIngreso.xhtml" />
                                    <p:menuitem value="Transfereir Ingreso" 
                                                outcome="/faces/consumidor/operarIngreso/transferirIngreso.xhtml" />
                                    <p:menuitem value="Aceptar Ingreso" 
                                                outcome="/faces/consumidor/operarIngreso/aceptarIngreso.xhtml"/>
                                </p:submenu>
                                <p:submenu label="Operar Consumo">
                                    <p:menuitem value="Operar" outcome="/faces/consumidor/operarConsumo/operarConsumo.xhtml" />
                                </p:submenu>
                            </p:submenu>
                            <p:submenu label="Consumible">
                                <p:menuitem value="Crear" outcome="/faces/consumible/crearConsumible.xhtml"/>
                                <p:menuitem value="Baja" outcome="/faces/consumible/eliminarConsumible.xhtml" />
                                <p:menuitem value="Editar" outcome="/faces/consumible/editarConsumible.xhtml" />
                            </p:submenu>
                            <p:submenu label="Agenda">
                                <p:menuitem value="Crear" outcome="/faces/agenda/crearPersona.xhtml" />
                                <p:menuitem value="Baja" outcome="/faces/agenda/eliminarPersona.xhtml" />
                                <p:menuitem value="Editar" outcome="/faces/agenda/editarPersona.xhtml" />
                            </p:submenu>
                            <p:submenu label="Categoria">
                                <p:menuitem value="Crear" outcome="/faces/categoria/crearCategoria.xhtml" />
                                <p:menuitem value="Baja" outcome="/faces/categoria/eliminarCategoria.xhtml" />
                                <p:menuitem value="Editar" outcome="/faces/categoria/editarCategoria.xhtml" />
                            </p:submenu>
                            <p:submenu label="Reporte">
                                <p:menuitem value="Crear" outcome="/faces/reporte/crearReporte.xhtml" />
                                <p:menuitem value="Baja" outcome="/faces/reporte/eliminarReporte.xhtml" />
                                <p:menuitem value="Editar" outcome="/faces/reporte/editarReporte.xhtml" />
                                <p:menuitem value="Generar" outcome="/faces/reporte/reporte.xhtml" />
                            </p:submenu>
                        </p:panelMenu>
                    </h:form>
                </ui:insert>
            </div>
            <div id="content" class="left_content">
                <ui:insert name="content">PRP</ui:insert>
            </div>
        </div>
        <div id="bottom">
            <ui:insert name="bottom">Sistema Planeador de Recursos Personales</ui:insert>
        </div>

    </h:body>
 </f:view>
</html>
